package com.example.common.enums;


/**
 * 日志操作类型
 */
public enum EnumHelperCode{

    LOGIN(1, "登录"),
    INSERT(2, "增加"),
    UPDATE(3, "修改"),
    DELETE(4, "删除");

    private final Integer value;
    private final String description;

    EnumHelperCode(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public Integer getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static String valuesDescription(int value){

        int i = value;
        switch(i){
            case 1:
                return LOGIN.getDescription();
            case 2:
                return INSERT.getDescription();
            case 3:
                return UPDATE.getDescription();
            case 4:
                return DELETE.getDescription();
            default:
                return " ";
        }

    }

}
